package com.itheima.edu.info.manager.entry;

import com.itheima.edu.info.manager.controller.Controller;
import com.itheima.edu.info.manager.dao.Dao;
import com.itheima.edu.info.manager.service.Service;

import java.util.Scanner;

public class infoEntry {
    public static Dao DAO = new Dao();

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.println("-----------欢迎来到黑马信息管理系统-----------");
            System.out.println("请输入您的选择:1.学生管理 2.老师管理 3.退出");
            String choice = sc.nextLine();
            switch (choice) {
                case "1":
                    //学生管理
                    Controller StudentController = new Controller("学生","Student");
                    DAO.flag = "Student";
                    StudentController.strat();
                    break;
                case "2":
                    //老师管理
                    Controller  TeacherController = new Controller("老师","Teacher1");
                    DAO.flag = "Teacher";
                    TeacherController.strat();
                    break;
                case "3":
                    //退出
                    System.out.println("欢迎下次使用,再见");
                    return;
                default:
                    System.out.println("您的输入有误,请重新输入");
                    break;
            }
        }

    }
}
